package com.cskaoyan.servlet;

import com.cskaoyan.bean.MarketBrand;
import com.cskaoyan.bean.MarketCategory;
import com.cskaoyan.bean.common.BaseRespVo;
import com.cskaoyan.service.GroupGoodsManagementService;
import com.cskaoyan.service.GroupGoodsManagementServiceImpl;
import com.cskaoyan.service.OrderService;
import com.cskaoyan.service.OrderServiceImpl;
import com.cskaoyan.util.ResponseUtil;

import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.text.ParseException;
import java.util.List;
import java.util.Map;

@WebServlet("/admin/goods/catAndBrand")
public class GroupGoodsManagementCatAndBrandServlet extends WdBaseServlet{
    private void catAndBrand(HttpServletRequest request, HttpServletResponse response) throws ParseException, IOException {
        GroupGoodsManagementService goodsManagementService = new GroupGoodsManagementServiceImpl();
//        Integer orderId = request.getParameter("id") == null?null:Integer.parseInt(request.getParameter("id"));
//        DataDetail dataDetail = orderDetailService.queryOrderDetail(orderId);
//
//        ResponseUtil.responseJson(response, BaseRespVo.ok(dataDetail));
        BaseRespVo catAndBrands = goodsManagementService.catAndBrandsList();

        ResponseUtil.responseJson(response, catAndBrands);

    }
}
